
import { request } from '../../utils/request'
import { getLiveId } from '../../utils/storage'

// 开宝箱充值
export function kbxRecharge(paramObj) {
    return request('hmWxmoney/chongzhiKbx', 'POST', {
        splid: getLiveId(),
        giftId: 'kbx',
        userId: paramObj.userId,
        openid: paramObj.openid,
        total: paramObj.money,
    });
}

// 抢宝箱
export function robBox(paramObj) {
    return request('kakaluote/guipaiqigong6', 'POST', {
        splid: getLiveId(),
        boxIdList: paramObj.boxIds,
        order_by: paramObj.sort,
    });
}

// 获取宝箱列表
export function getBoxesList() {
    return request('kakaluote/chaojisaiyaren6', 'GET', {
        splid: getLiveId(),
    });
}

// 发送广播
export function sendBroadCast(paramObj) {
    return request('sendMsgController/duxin6', 'POST', {
        splid: getLiveId(),
        ykq_info: paramObj.c
    });
}

// 获取游戏状态
export function getGameState(userId) {
    return request('play/baiyan6', 'GET', {
        splid: getLiveId(),
        userId,
    });
}

// 获取我的宝箱
export function getMyBoxes() {
    return request('kakaluote/jianlai6', 'GET', {
        splid: getLiveId(),
    });
}

// 获取红包列表
export function getHbList(cancelLoading) {
    return request('hbqController/showHbqList6', 'GET', {
        splid: getLiveId(),
        cancelLoading,
    });
}

// 买红包
export function buyHb(paramObj) {
    return request('hbqController/hbqPay6', 'POST', {
        splid: getLiveId(),
        eggIdList: paramObj.hbIds,
        order_by: paramObj.sort,
    });
}

// 红包墙充值
export function hbqRecharge(paramObj) {
    return request('hmWxmoney/chongzhiKbx', 'POST', {
        splid: getLiveId(),
        giftId: 'hbq',
        userId: paramObj.userId,
        openid: paramObj.openid,
        total: paramObj.money,
    });
}

// 获取红包排行榜
export function getHbRankList() {
    return request('hbqController/hbqRankList6', 'GET', {
        splid: getLiveId(),
    });
}